﻿@model IEnumerable<Hostal.Bussines.Entities.Proveedore>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>

@using (Html.BeginForm())
{
    <fieldset>
        <legend>Buscar Proveedor</legend>
        <b>Razon Social:</b>
        @Html.TextBox("razon")
        <input type="submit" name="btnBuscar" value="Buscar" />
    </fieldset>
}
<table>
    <tr>
        <th>
            <b>ID</b>
        </th>
        <th>
            <b>RUC</b>
        </th>
        <th>
            <b>Razon Social</b>
        </th>
        <th>
            <b>Direccion</b>
        </th>
        <th>
            <b>Telefono</b>
        </th>
        <th>
            <b>Descripcion</b>
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.IdProveedor)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.RUC)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.RazonSocial)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Direccion)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Telefono)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Descripcion)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.IdProveedor }) |            
            @Html.ActionLink("Delete", "Delete", new { id=item.IdProveedor },
            new  { onClick="return confirm('Desea Eliminar la Habitacion: " + @item.Descripcion +"?');"})
        </td>
    </tr>
}

</table>
